/**
 * 报表设计公司(2011)
 */
package com.reportgear.designer.action.style;

import java.util.EventObject;
import java.util.Vector;

import javax.swing.JComboBox;
import javax.swing.JComponent;

import com.reportgear.designer.action.StyleAction;

/**
 * @version 1.0 2011-3-24
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since ANNCSR 2.0
 */
public class ReportFontSizeAction extends StyleAction {

	public ReportFontSizeAction() {
		setName("字体大小");
	}

	@Override
	public JComponent createToolBarComponent() {
		Object localObject = getValue(JComboBox.class.getName());
		if ((localObject == null) || (!(localObject instanceof JComboBox))) {
			Vector localVector = new Vector();
			for (int i = 1; i < 100; ++i) {
				localVector.add(new Integer(i));
			}
			JComboBox localJComboBox = new JComboBox(localVector);
			putValue(JComboBox.class.getName(), localJComboBox);
			localJComboBox.setEnabled(isEnabled());
			localJComboBox.addActionListener(this);
			return localJComboBox;
		}
		return ((JComponent) localObject);
	}

	@Override
	public boolean executeAction(EventObject evt) {
		throw new UnsupportedOperationException("Not supported yet.");
	}

}
